package com.education.platform.dao;

import com.education.platform.common.dao.BaseDao;
import com.education.platform.dao.model.ArticleModel;
import org.springframework.stereotype.Repository;
import com.education.platform.dao.entity.ArticleDO;

import java.util.List;

/**
* describe: 文章
* @author : 
* @date: 2020-07-06 09:23:16.228
**/
@Repository
public interface ArticleDao extends BaseDao<ArticleDO> {

    /**
     * app列表
     * @param query
     * @return
     */
   List<ArticleModel> getArticleListApp(ArticleModel query);

    /**
     * 后台列表
     * @param query
     * @return
     */
   List<ArticleModel> getArticleListBms(ArticleModel query);

    /**
     * 批量修改点赞数  收藏数
     * @param list
     * @return
     */
    int updateCountBatch(List<ArticleDO> list);

    /**
     * 销量+1
     * @param id
     * @return
     */
    int incSalesNum(Integer id);
}